Skip to content

feat(ios): consume RiveRuntime via SPM#176

Draft
mfazekas wants to merge 5 commits intomainfrom
feat/rive-ios-spm
Draft

feat(ios): consume RiveRuntime via SPM#176
mfazekas wants to merge 5 commits intomainfrom
feat/rive-ios-spm

Conversation

@mfazekas
Copy link
Collaborator

@mfazekas mfazekas commented Mar 9, 2026

Status

On hold as not Xcode 26 comaptible

Summary

  • Consume RiveRuntime via SPM (rive-app/rive-ios) instead of as a CocoaPods pod
  • Version is pinned to exactVersion and sourced from package.json#runtimeVersions.ios (overridable via env var, global, or Podfile.properties.json)
  • RiveSPMEmbedFix hooks into Pod::Installer post-install to embed the SPM-resolved RiveRuntime.framework automatically — no consumer Podfile changes needed
  • Fixes Xcode 26 ODR errors: RiveRuntime is now compiled from source alongside the app, eliminating the Swift version mismatch between the prebuilt XCFramework and local pods Not true this does not work with Xcode 26

mfazekas and others added 5 commits March 9, 2026 15:38
Replace `s.dependency "RiveRuntime"` with `spm_dependency` pointing at
rive-app/rive-ios on GitHub. The version is still sourced from the
existing resolution chain (env var → global var → Podfile.properties.json
→ package.json `runtimeVersions.ios`), so no version pinning changes are
needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Using exactVersion instead of upToNextMajorVersion ensures the SPM
package resolves to the same version declared in package.json. Users
can still override via the existing env var / global / Podfile.properties.json
mechanism.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CocoaPods does not automatically embed dynamic frameworks resolved via
spm_dependency. Add a post_install step to both example Podfiles that
appends the RiveRuntime embed call to every target's frameworks.sh
script. Targets are discovered dynamically so no target name is
hardcoded.

Consumers of this library will need the same post_install hook in
their own Podfiles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pend

Instead of requiring every consumer to add a post_install hook to their
Podfile, hook into run_podfile_post_install_hooks directly from the
podspec using the same Pod::Installer.prepend pattern as the Xcode 26
modulemap fix. Removes the duplicate workaround from both example
Podfiles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mfazekas mfazekas requested a review from HayesGordon March 10, 2026 17:27
@mfazekas mfazekas marked this pull request as draft March 11, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant